/**
 * Description: 统一依赖管理
 */


object AndroidX {
    const val core_ktx = "androidx.core:core-ktx:${Versions.core_ktx}"
    const val appcompat = "androidx.appcompat:appcompat:${Versions.appcompat}"
    const val constraintLayout =
        "androidx.constraintlayout:constraintlayout:${Versions.constraintLayout}"
    const val pagingRuntime = "androidx.paging:paging-runtime:${Versions.paging}"
    const val annotation = "androidx.annotation:annotation:${Versions.annotation}"

    const val workTesting = "androidx.work:work-testing:${Versions.work}"


    const val androidx_work_runtime = "androidx.work:work-runtime:${Versions.androidx_work_version}"
    const val androidx_work_ktx = "androidx.work:work-runtime-ktx:${Versions.androidx_work_version}"

}

object CommonUI {
    const val swiperefreshlayout =
        "androidx.swiperefreshlayout:swiperefreshlayout:${Versions.swiperefreshlayout}"
    const val cardView = "androidx.cardview:cardview:${Versions.cardView}"
    const val recyclerview = "androidx.recyclerview:recyclerview:${Versions.recyclerview}"
//    const val viewpager = "androidx.viewpager:viewpager:${Versions.recyclerview}"

}

object Kt {
    const val kotlin_stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Versions.kotlin_version}"
    const val kotlinx_coroutines =
        "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinx_coroutines}"
    const val kotlinx_coroutines_android =
        "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.kotlinx_coroutines}"
}

object Retrofit {
    const val retrofit = "com.squareup.retrofit2:retrofit:${Versions.retrofit}"
    const val gson = "com.squareup.retrofit2:converter-gson:${Versions.retrofit}"
    const val adapter_rxjava2 = "com.squareup.retrofit2:adapter-rxjava2:${Versions.retrofit}"

    const val okhttp3 = "com.squareup.okhttp3:okhttp:4.10.0"

    //动态替换BaseUrl库 使用可参考 https://github.com/JessYanCoding/RetrofitUrlManager
    const val retrofit_url_manager = "me.jessyan:retrofit-url-manager:1.4.0"

    //数据持久化
    const val persistent_cookieJar = "com.github.franmontiel:PersistentCookieJar:v1.0.1"

    val retrofit_list = listOf(
        retrofit, retrofit_url_manager,okhttp3, gson, adapter_rxjava2, persistent_cookieJar
    )
}

object RxJava {
    const val rxjava = "io.reactivex.rxjava2:rxjava:${Versions.rxjava2}"
    const val rxandroid2 = "io.reactivex.rxjava2:rxandroid:${Versions.rxandroid2}"

    const val autodispose = "com.uber.autodispose:autodispose:${Versions.autodispose}"
    const val autodispose_android_archcomponents =
        "com.uber.autodispose:autodispose-android-archcomponents:${Versions.autodispose}"

}

/**权限*/
object Permissions {
    // 权限请求框架：https://github.com/getActivity/XXPermissions
    const val xxPermissions = "com.github.getActivity:XXPermissions:16.0"
}

//刷新
object SmartRefresh {
    const val refresh_layout = "io.github.scwang90:refresh-layout-kernel:${Versions.SmartRefresh}"
    const val refresh_header = "io.github.scwang90:refresh-header-classics:${Versions.SmartRefresh}"
    const val refresh_footer = "io.github.scwang90:refresh-footer-classics:${Versions.SmartRefresh}"
    val refreshList = listOf(
        refresh_layout, refresh_header, refresh_footer
    )
}

object Dependence {

    const val material = "com.google.android.material:material:${Versions.material}"
    const val google_gson = "com.google.code.gson:gson:${Versions.google_gson}"

    // glide
    const val glide = "com.github.bumptech.glide:glide:${Versions.glide}"
    const val glide_compiler = "com.github.bumptech.glide:compiler:${Versions.glide}"

    //Glide支持webp动图的库
    const val glide_webp = "com.github.zjupure:webpdecoder:2.0.4.12.0"

    const val coil = "io.coil-kt:coil:${Versions.coil}"

    // 如果想要显示 Gif、SVG、视频帧等类型的图片，则需要额外引入对应的支持库：
    const val coil_gif = "io.coil-kt:coil-gif:${Versions.coil}"
    const val coil_svg = "io.coil-kt:coil-svg:${Versions.coil}"
    const val coil_video = "io.coil-kt:coil-video:${Versions.coil}"
    val coilValue = listOf(coil, coil_svg, coil_gif)

/*
    //图片加载 - 一个支持webp的控件
    const val img_fresco = "com.facebook.fresco:fresco:${Versions.fresco}"
    const val img_fresco_webp_animated = "com.facebook.fresco:animated-webp:${Versions.fresco}"
    const val img_fresco_webp_support = "com.facebook.fresco:webpsupport:${Versions.fresco}"

    val frescoValue = listOf(
        img_fresco,
        img_fresco_webp_animated,
        img_fresco_webp_support,
    )*/

    //数据库存储
    const val android_data_storage =
        "xiaofei.library:android-data-storage:${Versions.android_data_storage}"

    //沉浸式状态栏
    const val immersionbar = "com.geyifeng.immersionbar:immersionbar:${Versions.immersionbar}"
    const val immersionbar_ktx =
        "com.geyifeng.immersionbar:immersionbar-ktx:${Versions.immersionbar}"


    const val bottomNavigationBar = "com.github.ittianyu:BottomNavigationViewEx:2.0.4"

    /**通用适配器*/
    const val baseRecyclerViewAdapter =
        "com.github.CymChad:BaseRecyclerViewAdapterHelper:${Versions.baseRecyclerAdapter}"
    const val flexbox = "com.google.android.flexbox:flexbox:${Versions.flexbox}"

    /**工具类合集*/
//    const val utilcodex = "com.blankj:utilcodex:1.26.0"
    const val utilcodex = "com.blankj:utilcodex:1.31.1"

    /** 騰訊的mmkv 替代sp  */
    const val mmkv = "com.tencent:mmkv:1.2.14"

    const val bugly = "com.tencent.bugly:crashreport:${Versions.bugly}"

    //shape 增强控件圆角阴影 https://github.com/RuffianZhong/RWidgetHelper
    const val RWidgetHelper = "com.github.RuffianZhong:RWidgetHelper:androidx.v0.0.14"

    //XPopup 弹窗
    const val XPopup = "com.github.li-xiaojun:XPopup:2.8.14"

    //现在Maven Central - 轮播
    const val banner = "io.github.youth5201314:banner:2.2.2"

    //屏幕适配
    const val autosize = "com.github.JessYanCoding:AndroidAutoSize:v1.2.1"

    //tablayut 扩展使用
    const val tablayout_ktx = "com.github.loperSeven:tablayout-ext:0.1.4"

    //图片选择框架 pictureselector
    const val pictureselector = "io.github.lucksiege:pictureselector:v3.11.2"

    //加载svga
    const val svga_player = "com.github.svga:SVGAPlayer-Android:2.5.5"

    //三级联动
    const val picker_view = "com.contrarywind:Android-PickerView:4.1.9"

    //一个悬浮窗 https://github.com/princekin-f/EasyFloat
    const val EasyFloat = "com.github.princekin-f:EasyFloat:2.0.4"
}

/**路由框架*/
object Router {
    // ARouter
    const val arouter = "com.alibaba:arouter-api:${Versions.arouter_api}"
    const val arouterCompiler = "com.alibaba:arouter-compiler:${Versions.arouter_api}"
}

object MaterialDialog {
    const val core = "com.afollestad.material-dialogs:core:${Versions.material_dialog}"
    const val ext_lifecycle =
        "com.afollestad.material-dialogs:lifecycle:${Versions.material_dialog}"
    const val ext_color = "com.afollestad.material-dialogs:color:${Versions.material_dialog}"
    const val ext_datetime = "com.afollestad.material-dialogs:datetime:${Versions.material_dialog}"
    const val ext_bottom_sheet =
        "com.afollestad.material-dialogs:bottomsheets:${Versions.material_dialog}"

    val values = listOf(
        core, ext_lifecycle, ext_color, ext_datetime, ext_bottom_sheet
    )
}

//jetpack 相关
object JetpackRely {
    //
    const val fragment_ktx = "androidx.fragment:fragment-ktx:1.6.2"
    const val activity_ktx = "androidx.activity:activity-ktx:1.8.2"

    //webView
    const val kit_web = "androidx.webkit:webkit:1.8.0"


    //～～～～～～～～～～  liveDate  ～～～～～～～～～～～～
    //一个解决livedata数据倒灌的库
    const val livedata_unpeek_ktx = "com.kunminx.arch:unpeek-livedata:7.6.0"


    //～～～～～～～～～～  lifecycle  ～～～～～～～～～～～～
    const val lifecycle_runtime = "androidx.lifecycle:lifecycle-runtime-ktx:${Versions.lifecycle}"
    const val lifecycle_common = "androidx.lifecycle:lifecycle-common-java8:${Versions.lifecycle}"
    const val lifecycle_service = "androidx.lifecycle:lifecycle-service:${Versions.lifecycle}"
//    const val lifecycle_viewmodel = "androidx.lifecycle:lifecycle-viewmodel:${Versions.lifecycle}"
    const val lifecycle_viewmodel_ktx = "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.lifecycle}"

    const val lifecycle_livedata = "androidx.lifecycle:lifecycle-livedata:${Versions.lifecycle}"
    const val lifecycle_livedata_ktx =
        "androidx.lifecycle:lifecycle-livedata-ktx:${Versions.lifecycle}"
    const val lifecycle_process = "androidx.lifecycle:lifecycle-process:${Versions.lifecycle}"
    const val lifecycle_viewmodel_compose =
        "androidx.lifecycle:lifecycle-viewmodel-compose:${Versions.lifecycle}"

    val lifecycleList = listOf(
        lifecycle_runtime,
        lifecycle_common,
        lifecycle_service,
//        lifecycle_viewmodel,
        lifecycle_viewmodel_ktx,
        lifecycle_livedata,
        lifecycle_livedata_ktx,
        lifecycle_process
    )

    //～～～～～～～～～～  navigation  ～～～～～～～～～～
    const val navigation_fragment =
        "androidx.navigation:navigation-fragment-ktx:${Versions.navigation}"
    const val navigation_ui_ktx = "androidx.navigation:navigation-ui-ktx:${Versions.navigation}"
    val navigation_values = listOf(
        navigation_fragment, navigation_ui_ktx
    )

    //~~~~~~~~~~~~~~~~~~~ Room ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    const val room_runtime = "androidx.room:room-runtime:${Versions.room}"
    const val room_compiler = "androidx.room:room-compiler:${Versions.room}"
    const val room_rxjava2 = "androidx.room:room-rxjava2:${Versions.room}"
    const val room_rxjava3 = "androidx.room:room-rxjava3:${Versions.room}"
    const val room_guava = "androidx.room:room-guava:${Versions.room}"
    const val room_paging = "androidx.room:room-paging:2.5.0-alpha01"

    val room_values = listOf(
        room_runtime, room_rxjava2, room_rxjava3, room_guava
    )

}

/**
 * ~~~~~~~~~~~  compose ~~~~~~~~~~
 * [https://developer.android.google.cn/jetpack/androidx/releases/compose-ui?hl=zh_tw&authuser=1]
 * */
object Compose {
    const val composePreview = "androidx.compose.ui:ui-tooling-preview:${Versions.compose}"
    const val composeUi = "androidx.compose.ui:ui:${Versions.compose}"
    const val composeUiTooling = "androidx.compose.ui:ui-tooling:${Versions.compose}"
    const val composeMaterial = "androidx.compose.material:material:${Versions.composeMaterial}"
    const val composeActivity = "androidx.activity:activity-compose:${Versions.activityCompose}"

    const val composeRuntimeLivedata =
        "androidx.compose.runtime:runtime-livedata:${Versions.compose}"
    const val composeViewModel =
        "androidx.lifecycle:lifecycle-viewmodel-compose:${Versions.lifecycle}"
}


